import {http} from "@/utils/http/axios";


export interface Subpackage {
  appDesc?: string;
  appIcon?: string;
  appKey?: string;
  appName?: string;
  appStatus?: string;
  appType?: string;
  chanId?: string;
  chanName?: string;
  createTime?: string;
  downUrl?: string;
  gameKey?: string;
  gameName?: string;
  id?: number;
  isPack?: string;
  redStatus?: string;
  updateTime?: string;
}

/**
 * 获取全部通道
 */
export function getAllPackage() {
  return http.request({
    url: '/system/pack/all',
    method: 'GET',
  });
}

/**
 * 添加壳包
 * @param params
 */
export function registerPackage(params: Subpackage) {
  return http.request({
    url: '/system/pack/regist',
    method: 'POST',
    params
  });
}

/**
 * 更新壳包
 * @param params
 */
export function updateSubPackage(params: Subpackage) {
  return http.request({
    url: '/system/pack/update',
    method: 'POST',
    params
  });
}

/**
 * 删除壳包
 * @param params
 */
export function deleteSubPackage(params) {
  return http.request({
    url: '/system/pack/delete',
    method: 'POST',
    params
  });
}

/**
 * 获取对接参数
 * @param params
 */
export function getdockParm(params: Subpackage) {
  return http.request({
    url: '/system/pack/dockParm',
    method: 'POST',
    params
  });
}

